CURL_INC=C:\Libs\curl-7.22.0\include
PTHREAD_INC=C:\Libs\pthreads-w32-2-8-0-release
CURL_LIB=C:\Libs\curl-7.22.0\lib
PTHREAD_LIB=C:\Libs\pthreads-w32-2-8-0-release\lib

AutoDebrid-w32: global.o main.o debridFetcherBase.o debridManager.o debridFetcherW32.o debridFetcherAD.o debridFetcherRD.o md5cpp.o
	g++ -o AutoDebrid global.o main.o debridFetcherBase.o debridManager.o debridFetcherW32.o debridFetcherAD.o debridFetcherRD.o md5cpp.o -L$(CURL_LIB) -L$(PTHREAD_LIB) -lintl -lpthreadGCE2 -lcurldll

AutoDebrid-linux: global.o main.o debridFetcherBase.o debridManager.o  debridFetcherLinux.o debridFetcherAD.o debridFetcherRD.o md5cpp.o
	g++ -o AutoDebrid global.o main.o debridFetcherBase.o debridManager.o debridFetcherLinux.o debridFetcherAD.o debridFetcherRD.o md5cpp.o -lpthread `curl-config --libs`

AutoDebrid-bsd: global.o main.o debridFetcherBase.o debridManager.o debridFetcherUnix.o debridFetcherAD.o debridFetcherRD.o md5cpp.o
	g++ -o AutoDebrid global.o main.o debridFetcherBase.o debridManager.o debridFetcherUnix.o debridFetcherAD.o debridFetcherRD.o md5cpp.o -lpthread `curl-config --libs` -lintl

global.o: src/global.cpp
	g++ -o global.o -c src/global.cpp -O2 -s -I/usr/local/include -Iinclude/ -I$(CURL_INC) -I$(PTHREAD_INC)

main.o: src/main.cpp
	g++ -o main.o -c src/main.cpp -O2 -s -I/usr/local/include -Iinclude/ -I$(CURL_INC) -I$(PTHREAD_INC)
	
debridFetcherBase.o:  src/debridFetcherBase.cpp
	g++ -o debridFetcherBase.o -c src/debridFetcherBase.cpp -O2 -s -I/usr/local/include -Iinclude/ -I$(CURL_INC) -I$(PTHREAD_INC)
	
debridManager.o:  src/debridManager.cpp
	g++ -o debridManager.o -c src/debridManager.cpp -O2 -s -I/usr/local/include -Iinclude/ -I$(CURL_INC) -I$(PTHREAD_INC)
	
debridFetcherW32.o:  src/debridFetcherW32.cpp
	g++ -o debridFetcherW32.o -c src/debridFetcherW32.cpp -O2 -s -Iinclude/ -I$(CURL_INC) -I$(PTHREAD_INC)
	
debridFetcherLinux.o:  src/debridFetcherLinux.cpp
	g++ -o debridFetcherLinux.o -c src/debridFetcherLinux.cpp -O2 -s -I/usr/local/include -Iinclude/ -I$(CURL_INC) -I$(PTHREAD_INC)
	
debridFetcherUnix.o:  src/debridFetcherUnix.cpp
	g++ -o debridFetcherUnix.o -c src/debridFetcherUnix.cpp -O2 -s -I/usr/local/include -Iinclude/ -I$(CURL_INC) -I$(PTHREAD_INC)
	
debridFetcherAD.o:  src/debridFetcherAD.cpp
	g++ -o debridFetcherAD.o -c src/debridFetcherAD.cpp -O2 -s -I/usr/local/include -Iinclude/ -I$(CURL_INC) -I$(PTHREAD_INC)
	
debridFetcherRD.o:  src/debridFetcherRD.cpp
	g++ -o debridFetcherRD.o -c src/debridFetcherRD.cpp -O2 -s -I/usr/local/include -Iinclude/ -I$(CURL_INC) -I$(PTHREAD_INC)

md5cpp.o:	src/md5cpp.cpp
	g++ -o md5cpp.o -c src/md5cpp.cpp -O2 -s -I/usr/local/include -Iinclude/
clean:
	rm *.o
